package pl.edu.pk.mech.kkbus.model;

import java.io.Serializable;

import com.google.appengine.api.datastore.Entity;
import static pl.edu.pk.mech.kkbus.staticstrings.AwardProperty.*;

public class Award extends Pojo implements Serializable{

	private static final long serialVersionUID = 6490543325582173836L;
	String name;
    String description;
    int points;
    int quantity;

    public Award() {}

    public Award(Entity entity) {
		this.id = entity.getKey().getId();
    	this.name = (String) entity.getProperty(AWARD_NAME);
    	this.description = (String) entity.getProperty(AWARD_DESCRIPTION);
    	this.points = Integer.valueOf(entity.getProperty(AWARD_POINTS).toString());
    	this.quantity = Integer.valueOf(entity.getProperty(AWARD_QUANTITY).toString());
    }
    
    public Award(String name, String description, int points, int quantity) {
        this.name = name;
        this.description = description;
        this.points = points;
        this.quantity = quantity;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getPoints() {
        return points;
    }

    public void setPoints(int points) {
        this.points = points;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

}
